//
// log.js
// vue3-element-admin
//
// Created by 区区电脑 on 2023/04/10.
//

import _ from "lodash";

export default function log() {
    console.default = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.success = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;background-color: #67C23A;color: #fff;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.primary = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;background-color: #409EFF;color: #fff;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.warning = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;background-color: #E6A23C;color: #fff;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.danger = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;background-color: #F56C6C;color: #fff;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.successText = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;color: #67C23A;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.primaryText = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;color: #409EFF;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.warningText = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;color: #E6A23C;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
    console.dangerText = (key, data = "", data2 = "") => {
        console.log(`%c%s`, "padding: 6px;border-radius: 4px;color: #F56C6C;", key, _.cloneDeep(data), _.cloneDeep(data2))
    }
}
